package io.renren.config;  // 或者其它你想要放置的包

import io.renren.modules.testrestful.service.impl.UsersServiceImpl;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
import org.springframework.beans.factory.annotation.Autowired;

@Component
public class WebSocketConnectionRunner implements ApplicationRunner {

    private final UsersServiceImpl usersServiceImpl;

    @Autowired
    public WebSocketConnectionRunner(UsersServiceImpl usersServiceImpl) {
        this.usersServiceImpl = usersServiceImpl;
    }

    @Override
    public void run(ApplicationArguments args) throws Exception {
        usersServiceImpl.getDevicesInfo();
    }
}
